]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: Only spin on password entries
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 11 Feb 2020 13:33:02 +0000 (10:33 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 12 Feb 2020 19:29:48 +0000 (19:29 +0000)
Spinning while typing the password is a bit off-putting, and
inconsistent with how regular authentication behaves.

Only spin the spinner after typing the password.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922

js/gdm/authPrompt.js
js/gdm/loginDialog.js

index ff04af639707c222419927af31fbf3e8da77bab5..5b6966eb5c74544f766727fb10a95d0cedbebab3 100644 (file)
@@ -157,8 +157,9 @@ var AuthPrompt = GObject.registerClass({
             });
 
             entry.clutter_text.connect('activate', () => {
+                let shouldSpin = entry === this._passwordEntry;
                 if (entry.reactive)
-                    this._activateNext();
+                    this._activateNext(shouldSpin);
             });
         });
 
@@ -177,9 +178,12 @@ var AuthPrompt = GObject.registerClass({
         this._defaultButtonWell.add_child(this._spinner);
     }
 
-    _activateNext() {
+    _activateNext(shouldSpin) {
         this.updateSensitivity(false);
-        this.startSpinning();
+
+        if (shouldSpin)
+            this.startSpinning();
+
         if (this._queryingService)
             this._userVerifier.answerQuery(this._queryingService, this._entry.text);
         else
index 2505d1894f364afe83703b8a4451b144ee3380cd..cad09b54872594d29835f061ae89f6ae25db4694 100644 (file)
@@ -928,7 +928,6 @@ var LoginDialog = GObject.registerClass({
                 let answer = this._authPrompt.getAnswer();
                 this._user = this._userManager.get_user(answer);
                 this._authPrompt.clear();
-                this._authPrompt.startSpinning();
                 this._authPrompt.begin({ userName: answer });
                 this._updateCancelButton();
             });